package com;

import java.util.Calendar;
import java.util.Date;

import com.ecbt.rest.util.DateUtil;

public class TestFindNextWedsday {
	public static void main(String[] args) {
		
		for(int i=12;i<=25;i++) {
			Date date = DateUtil.str2Date("2021-07-"+i, "yyyy-MM-dd");
			System.out.print(date + "     ");
			Calendar c = Calendar.getInstance();
			c.setFirstDayOfWeek(Calendar.MONDAY);
		 	c.setTime(date);
			c.setTime(c.getTime());
		 	int day = c.get(Calendar.DAY_OF_WEEK);
		 	System.out.print(day + "    ");
		 	if(day ==1) {
		 		c.add(Calendar.DATE, day + 10 - 1);
		 	}else {
		 		c.add(Calendar.DATE, 7- day + 1 + 10);
		 	}
		 	System.out.println(c.getTime());
		}
	}
}
